Skip to content

refactor: Cache the Config Value#33

Merged
Nyeriah merged 4 commits intoazerothcore:masterfrom
Tereneckla:master
Apr 12, 2026
Merged

refactor: Cache the Config Value#33
Nyeriah merged 4 commits intoazerothcore:masterfrom
Tereneckla:master

Conversation

@Tereneckla
Copy link
Copy Markdown
Contributor

Changes Proposed:

Cache the config value. Example code should show the best practices

@Yehonal Yehonal requested a review from Copilot October 15, 2025 16:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors configuration value access to use a caching mechanism instead of direct sConfigMgr calls, improving performance by avoiding repeated config lookups. The change demonstrates best practices for config value caching in the AzerothCore framework.

Key changes:

  • Introduces a config caching system using ConfigValueCache with enum-based config identifiers
  • Replaces direct sConfigMgr->GetOption calls with cached config value access
  • Adds proper initialization through a WorldScript hook

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Nyeriah Nyeriah merged commit 877c24d into azerothcore:master Apr 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants